<template>
    <div>
        <el-button class="btn" type="primary" @click="back">返回上一级</el-button>
        <div class="main">
          <div class="pic" v-for="(item, index) in piclist" :key="index">
            <img style="width: 200px; height: 200px" :src="item.url" />
            <!-- <img src="" alt=""> -->
          </div>
        </div>
    </div>
</template>

<script>
import { photoList } from "@/api";

export default {
  data() {
    return {
      piclist: [],
      picData: {
        // pageNum: 1,
        // pageSize: 30,
        imei: "866222060108803",
      },
    };
  },
  async created() {
    // this.picData = JSON.stringify(this.picData)
    const res = await photoList(this.picData);
    console.log(res);
    this.piclist = res.data.data;
  },
  methods : {
    back() {
        this.$router.go(-1)
    }
  }
};
</script>

<style scoped lang="scss">
.main {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}
.pic {
  margin-right: 15px;
}
.btn {
    margin: 10px 0 10px 0;
}
</style>